package com.iamnh.basic.test.util;

import java.util.List;

import org.junit.Assert;

import com.iamnh.basic.model.TestObject;

public class EntitiesHelper {
	private static TestObject baseTestObject = new TestObject(1, "admin1");

	public static void assertTestObject(TestObject expected, TestObject actual) {
		Assert.assertNotNull(expected);
		Assert.assertEquals(expected.getId(), actual.getId());
		Assert.assertEquals(expected.getName(), actual.getName());
	}

	public static void assertTestObjects(List<TestObject> expected, List<TestObject> actuals) {
		for (int i = 0; i < expected.size(); i++) {
			TestObject eu = expected.get(i);
			TestObject au = actuals.get(i);
			assertTestObject(eu, au);
		}
	}

	public static void assertTestObject(TestObject expected) {
		assertTestObject(expected, baseTestObject);
	}
}
